/***************************************************************
 * Name:      CamApp.cpp
 * Purpose:   Code for Application Class
 * Author:    Riku Maikola (rpm@ac-mapa.org)
 * Created:   2011-02-17
 * Copyright: Riku Maikola (rpm.ac-mapa.org)
 * License:
 **************************************************************/

#ifdef WX_PRECOMP
#include "wx_pch.h"
#endif

#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#include "CamApp.h"
#include "CamMain.h"

IMPLEMENT_APP(CamApp);

bool CamApp::OnInit()
{
    //setlocale(LC_ALL,"C");
    wxInitAllImageHandlers();
    CamMain* frame = new CamMain(0L);
    frame->Show();
    frame->HOME =  wxString::FromUTF8(getenv("HOME"));

    if(argc==2)
    {
        frame->WORKDIR = argv[1];
    }
    else
    {
       return false;
    }
    frame->Initation();
    return true;
}
